#include<stdio.h>
#include<string.h>
#include<sys/types.h>
#include<sys/stat.h>
#include<fcntl.h>
#include<unistd.h>

#define Num 1024

int main()
{
    int fd=open("bit.txt",O_RDWR|O_CREAT);

    char ch[]="i like Linux!";
    write(fd,ch,strlen(ch));

    lseek(fd,0,SEEK_SET);

    char buf[Num];
    ssize_t n=read(fd,buf,sizeof(buf));
    buf[n]=0;
    printf("%s\n",buf);

    close(fd);

    return 0;

}